package com.company.cloud.mall.modules.api.response;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class OrderRefundsModel {

	@ApiModelProperty(value = "退款流水号")
	private String sn;


	@ApiModelProperty(value = "公司编号")
	private String companyNo;

	@ApiModelProperty(value = "主公司编号")
	private String mainCompanyNo;

	@ApiModelProperty(value = "商户编号")
	private String busiNo;

	@ApiModelProperty(value = "用户ID")
	private Integer userId;

	@ApiModelProperty(value = "订单流水号")
	private String orderSn;

	@ApiModelProperty(value = "订单明细ID")
	private Integer orderItemId;

	@ApiModelProperty(value = "商品编号")
	private String productNo;

	@ApiModelProperty(value = "主商品编号")
	private String mainProductNo;

	@ApiModelProperty(value = "SKU商品号")
	private String skuNo;

	@ApiModelProperty(value = "主SKU商品号")
	private String mainSkuNo;

	@ApiModelProperty(value = "商品名称")
	private String name;

	@ApiModelProperty(value = "商品缩略图")
	private String thumbnail;

	@ApiModelProperty(value = "商品规格")
	private String specifications;

	@ApiModelProperty(value = "货物状态（已到货、未到货）")
	private String productState;

	@ApiModelProperty(value = "退款原因")
	private String reason;

	@ApiModelProperty(value = "退款金额")
	private BigDecimal fund;

	@ApiModelProperty(value = "退货数量")
	private Integer quantity;

	@ApiModelProperty(value = "退款说明")
	private String memo;

	@ApiModelProperty(value = "退款凭证")
	private List<String> certificate;

	@ApiModelProperty(value = "退款处理状态")
	private String state;

	@ApiModelProperty(value = "退款处理备注")
	private String remark;

	@ApiModelProperty(value = "退款处理开始时间")
	private LocalDateTime startDate;

	@ApiModelProperty(value = "退款处理截止时间")
	private LocalDateTime endDate;

	@ApiModelProperty(value = "退款处理人用户ID")
	private Integer handleUserId;

	@ApiModelProperty(value = "退款处理时间")
	private LocalDateTime handleDate;


	@ApiModelProperty(value = "处理记录")
	private List<OrderLogModel> records;

	@ApiModelProperty(value = "用户名")
	private String userName;

	@ApiModelProperty(value = "用户昵称")
	private String userNickName;

	@ApiModelProperty(value = "用户真实姓名")
	private String userRealName;

	@ApiModelProperty(value = "用户头像")
	private String userHeadImg;

	@ApiModelProperty(value = "订单信息")
	private OrderModel orderInfo;

	public void addRecord(OrderLogModel record) {
		if (this.records == null) {
			this.records = new ArrayList<OrderLogModel>();
		}
		if (record != null) {
			this.records.add(record);
		}
	}
	
}
